package cn.maidouya.hrm.client;

import cn.maidouya.hrm.domain.LoginUser;
import cn.maidouya.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RegisterVipUserClientFallbackFactory implements FallbackFactory<IRegisterVipUserClient>{
    @Override
    public IRegisterVipUserClient create(Throwable throwable) {
        return new IRegisterVipUserClient() {
            @Override
            public AjaxResult addOrUpdate(LoginUser loginUser) {
                return AjaxResult.me().setSuccess(false).setMessage("注册失败！");
            }
        };
    }
}
